home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-03-06 | 1.5 KB | 59 lines |
- '===========================================================================
- ' Interface example 6.
-
- ' Written by Andy Smith for Amoszine
- '===========================================================================
-
-
- Resource Screen Open 0,640,256,0
- A$=A$+"BAse 200,100;"
- A$=A$+"SIze 250,50; SAve 1;"
- A$=A$+"BOx 0,0,1,250,50;"
- A$=A$+"PRint 10,2,'Enter some text below',7;"
-
- ' The LIne command draws a line from graphic elements contained with the
- ' resource bank. Its parameters are as follows:
-
- ' The X coordinate
- ' The Y coordinate
- ' The image number from the resource bank
- ' The width of the line
-
- A$=A$+"LIne 8,15,17,240;"
-
- ' The EDit command follows below. It sets up an edit zone where to can type
- ' text. The parameters are (in order):
-
- ' Identification number which ranges from 1 upwards.
- ' The X coordinate
- ' The Y coordinate
- ' The maximum amount of characters that can be displayed in the zone at once
- ' The maximum amount of characters that can be entered
- ' A string. In this case 'Change me' is displayed. This will be displayed
- ' when then the zone is first set up.
- ' The paper colour
- ' The pen colour
-
- A$=A$+"EDit 1,16,19,26,80,'Change me',0,7;"
-
- A$=A$+"EXit;"
-
- Dialog Open 1,A$
-
- R=Dialog Run(1)
- Repeat
- BUTTON=Dialog(1)
- Until BUTTON<>0
-
- ' The Rdialog$ function returns a string from a zone. Its parameters are as
- ' follows:
-
- ' The channel number
- ' The zone. Which corresponds to the interface program. Zone 1 is the EDit
- ' zone.
-
- MESSAGE$=Rdialog$(1,1)
-
- Dialog Close 1
-
- Print "You typed : ";MESSAGE$